
<div class="panel">
    <div class="panel-heading">
        文章发布
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-lg-10">
                <form class="form-horizontal" method="post" id="editForm">

                    <div class="form-group">
                        <label class="col-sm-2">标题：</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="title" placeholder="">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2">所属栏目：</label>
                        <div class="col-sm-4">
                            <select name="cid" class="mySelect" style="width: 100%">
                                <?= \app\admin\model\Column::option_article(input('get.cid'))?>
                            </select>
                        </div>
                        <label class="col-sm-2">缩略图：</label>
                        <div class="col-sm-4">
                            <{tmdTag:upimg name='image' /}>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2">关键字：</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="keyword">
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2">网站描述：</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="description">
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-sm-2">网站内容：</label>
                        <div class="col-sm-10">
                            <{tmdTag:editor name="content" /}>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2">排序：</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" name="listorder">
                        </div>
                        <label class="col-sm-2">模板：</label>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" name="templates">
                        </div>
                        <label class="col-sm-2">状态：</label>
                        <div class="col-sm-2">
                            <{tmdTag:select name="status" optname="article_status" /}>
                        </div>
                    </div>
                    

                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <input type="hidden" name="id">
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>
</div>

<script>
    $('#editForm').myForm();
    
    // <?php if ($editData) { ?> //
    var editData = <?=json_encode($editData, JSON_UNESCAPED_UNICODE)?>;
    $('#editForm').myFormData(editData);
    // <?php } ?> //

</script>